
FROM index.alauda.cn/tutum/ubuntu
MAINTAINER kalosmark

# Install squid packages

ADD sources.list /etc/apt/sources.list

RUN apt-get update && \
    apt-get -y install vim && \
    apt-get -y install build-essential libncurses5-dev cmake && \
    apt-get -y install build-essential openssl libssl0.9.8 libssl-dev && \
    wget http://www.squid-cache.org/Versions/v3/3.2/squid-3.2.4.tar.gz && \
    tar -zxvf squid-3.2.4.tar.gz && \
    cd squid-3.2.4 && \
    ./configure --enable-ssl && \
    make && make install

ADD lidongbest5.crt /usr/local/squid/etc/lidongbest5.crt

ADD lidongbest5.csr /usr/local/squid/etc/lidongbest5.csr

ADD lidongbest5.key /usr/local/squid/etc/lidongbest5.key

ADD squid.conf /usr/local/squid/etc/squid.conf
    
RUN cd /usr/local/squid && \
    chmod -R 777 var/logs

ADD run.sh /run.sh

RUN chmod 755 /run.sh

EXPOSE 1111

CMD ["/run.sh"]
